import 'package:flutter_billi/http/core/HiNet.dart';
import 'package:flutter_billi/http/request/ranking_request.dart';
import 'package:flutter_billi/model/ranking_mo.dart';

class RankingDao {
  static get(String sort, {int pageIndex = 10, pageSize = 10}) async {
    RankingRequest request = RankingRequest();
    request.add('sort', sort).add('pageIndex', pageIndex).add("pageSize", pageSize);
    var result = await HiNet.getInstance().fire(request);

    return RankingMo.fromJson(result['data']);
  }
}
